POV-Ray : Newsgroups : povray.general : Counter-intuitive behaviour in media scattering : Re: Counter-intuitive behaviour in media scattering Server Time
29 Jul 2024 12:27:57 EDT (-0400)
  Re: Counter-intuitive behaviour in media scattering  
From: Alain
Date: 25 May 2011 13:03:43
Message: <4ddd366f@news.povray.org>

> I'm trying to create a planet with an atmosphere.  I'm using modified code
> provided in my thread in p.b.i.
>
> from what I understand, from discussions, intuition and reading the docs,
> scattering specifies the type, color and amount of light diffused by the media:
> Thus, a scattering of
>
> scattering { 1,<0.3, 0.17, 0.05>*0.005 }
>
> should scatter very little light, allowing most of the light to reach the
> planet's surface, while
>
> scattering { 1,<0.3, 0.17, 0.05>*5 }
>
> should scatter 1000 times as much, allowing very little to reach the planet's
> surface.
>
> I have, however, observed the reverse for all scattering methods, where the
> first is opaque, as if the planet was shrouded in fog, and the second is mostly
> transparent, but not at all what it seems I should be getting.
>
> My media statement looks like this:
>
> media {
>       method 3
>       intervals 1
>       scattering {
>            4,<0.3, 0.17, 0.05>*1.618
>            extinction 1.0
>            }
>       samples 300
>       absorption rgb<0.95, 0.55, 0.15>*0.05
>       density {
>            function {exp( -(sqrt(x*x+y*y+z*z)-63870)/4 )}

You should use pow(x,2) instead of x*x. It's a little bit faster.

>            density_map {
>                 [0 rgb 0.0]
>                 [1 rgb 0.1]
>                 }
>            }
>       }
>
> This gives me a transparent atmosphere with a cast to the planet and heavy haze
> at the terminator.
>
> altering the scattering as in the first example gives a planet shrouded in fog.
>
> I would post images, but they take hours to render.
>
> any help would be appreciated.
>
> Regards,
> A.D.B.
>
>
>

What's the ambient value for your planet? Try setting it to zero.

I realy think that you should get rid of that extra absorbtion. A redish 
cast on the planet is normal.
If needed, alter the light's colour to make it a little bluish.

Alain


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.